<template>
	<view>
		<view class="copyright">
			Copyright 2012- 2020 </br>
			渝ICP备19010173号-41</br>
			版权所有 蝶丝商城 
		</view>
		<view class="foot-bottom">
			<view class="foot-nav-left">
				<button @click="switchTab('/pages/index/index')">
					<text class="hd-icon i">&#xe767;</text>
					<view class="h3">首页</view>
				</button>
				<button open-type="contact">
					<text class="hd-icon i">&#xe65e;</text>
					<view class="h3">客服</view>
				</button>
				<button @click="switchTab('/pages/personal/index')">
					<text class="hd-icon i">&#xe60b;</text>
					<view class="h3">会员</view>
				</button>
			</view>
			<view class="foot-nav-right">
				<view class="li" @click="navigateTo('/pages/goods/index')">全部商品</view>
				<view class="li" @click="switchTab('/pages/brand/index')">品牌列表</view>
			</view>
		</view>
	</view>
</template>

<script>
    import config  from '@/utils/config.js';
	export default{
		onShareAppMessage(res) {
		if (res.from === 'button') {// 来自页面内分享按钮
		}
		var pages = getCurrentPages();
		var page = pages[pages.length - 1];
		return {
		  title: '自定义分享标题',
		  path: '/pages/test/test?id=123'
		}
	  },
		data(){
			return{
				service:''
			}
		},
        mounted() {
			 uni.hideTabBar();
            this.service = config.serviceUrl
        },
		methods:{
			navigateTo(url){
				uni.navigateTo({
				    url: url
				});
			},
            switchTab(url){
            	uni.switchTab({
            	    url: url
            	});
            }
		}
	}
</script>

<style scoped lang="scss">
	.copyright{
		text-align: center;
		font-size:12px;
		color:#333;
		margin-bottom:148rpx;
		span{
			color:#999;
			margin-right:15rpx;
		}
	}
	.foot-bottom{
		background: #fff;
		position: fixed;
		bottom:0;
		width:100%;
		left:0;
		display: flex;
		z-index: 999;
		justify-content: space-between;
		height: 118rpx;
		.foot-nav-left{
			width:50%;
			display: flex;
			justify-content: space-between;
			align-items: center;
			button{
                background:none;
				width:33.3%;
				text-align: center;
				border-right:1px solid #ededed;
                line-height: 44rpx;
				&:nth-last-of-type(1){
					border-right:none;
				}
				.i{
					font-size:16px;
				}
				.h3{
					font-size:12px;
					color:#666;
				}
                &::after{
                    border:none;
                    border-radius:0;
                    height:auto;
                }
			}
		}
		.foot-nav-right{
			width:50%;
			display: flex;
			justify-content: space-between;
			.li{
				width:50%;
				text-align: center;
				font-size:12px;
				line-height: 118rpx;
				&:nth-of-type(1){
					color:#ff5777 ;
					background: #ffe6e8;
				}
				&:nth-of-type(2){
					color:#fff ;
					background: linear-gradient(90deg, #ff5777, #ff468f);;
				}
			}
		}
	}
</style>
